import request from '@/utils/request2'

// 查询学生基本信息列表
export function listStu(query) {
  return request({
    url: '/stuManage/stu/list',
    method: 'get',
    params: query
  })
}

export function getStu(id) {
  return request({
    url: '/stuManage/stu/' + id,
    method: 'get'
  })
}

export function notAtSchoolList(query) {
  return request({
    url: '/stuManage/stu/notAtSchoolList',
    method: 'get',
    params: query
  })
}

export function collegeBuildingSta(schoolArea) {
  return request({
    url: '/stuManage/stu/collegeBuildingSta',
    method: 'get',
    params: schoolArea
  })
}

//leaveSchoolSta
export function leaveSchoolSta() {
  return request({
    url: '/stuManage/stu/leaveSchoolSta',
    method: 'get'
  })
}
//leaveSchoolStus
export function leaveSchoolStus(query) {
  return request({
    url: '/stuManage/stu/leaveSchoolStus',
    method: 'get',
    params: query
  })
}

export function oldAndNewStatistics() {
  return request({
    url: '/stuManage/stu/oldAndNewStatistics',
    method: 'get'
  })
}

export function childrenStatistics(query) {
  return request({
    url: '/stuManage/stu/childrenStatistics',
    method: 'get',
    params: query
  })
}

export function notAtSchoolReasonList(query) {
  return request({
    url: '/stuManage/stu/notAtSchoolReasonList',
    method: 'get',
    params: query
  })
}
export function notAtSchoolReasonListExport(query) {
  return request({
    url: '/stuManage/stu/notAtSchoolReasonListExport',
    method: 'post',
    data: query
  })
}

// 新增学生基本信息
export function addStu(data) {
  return request({
    url: '/stuManage/stu',
    method: 'post',
    data: data
  })
}

// 修改学生基本信息
export function updateStu(data) {
  return request({
    url: '/stuManage/stu',
    method: 'put',
    data: data
  })
}

// 删除学生基本信息
export function delStu(id) {
  return request({
    url: '/stuManage/stu/' + id,
    method: 'delete'
  })
}
